package com.itlong.cloud.sdk.dao;

import com.itlong.cloud.POJO.DTO.sdk.CloudTalkSDKAppUserLoginDTO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkSDKAPPAllDeviceListVO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkSDKAppDemoLoginVO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkSDKAppUserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <desc>
 *      云对讲SDKAPP用户信息数据访问接口
 * </desc>
 *
 * @createDate 2018/05/11
 */
@Repository
@Mapper
public interface ICloudTalkSDKAppUserDao {
    /**
     * <desc>
     *      sdk认证检测是否有权限
     * </desc>
     * @param cloudTalkSDKAppUserLoginDTO
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/11
     */
    Integer checkSDKSecret(CloudTalkSDKAppUserLoginDTO cloudTalkSDKAppUserLoginDTO);

    /**
     * <desc>
     *      查询用户手机号是否存在并返回
     * </desc>
     *
     * @param phoenNum
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/11
     */
    CloudTalkSDKAppUserVO checkUserPhone(@Param("phoneNum") String phoenNum);

    /**
     * <desc>
     *     根据手机号获取用户id
     * </desc>
     *
     * @param phoneNum
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/14
     */
    String getUserIdByPhoneNum(@Param("phoneNum") String phoneNum);

    /**
     * <desc>
     *      手机号验证
     * </desc>
     *
     * @return 验证成功与否
     * @author wangzhi
     * @createDate 2018/11/21
     */
    Integer loginByPhoneNo(@Param("phoneNo") String phoneNo, @Param("pswd") String pswd);

    /**
     * <desc>
     *      邮箱验证
     * </desc>
     *
     * @return 验证成功与否
     * @author wangzhi
     * @createDate 2018/11/21
     */
    Integer loginByEmail(@Param("phoneNo") String phoneNo, @Param("pswd") String pswd);

    /**
     * <desc>
     *      获取用户信息 by 手机号
     * </desc>
     *
     * @return 用户信息
     * @author wangzhi
     * @createDate 2018/11/21
     */
    CloudTalkSDKAppDemoLoginVO getDeviceDataByPhoneNo(@Param("phoneNo") String phoneNo, @Param("pswd") String pswd);

    /**
     * <desc>
     *      获取用户信息 by 邮箱
     * </desc>
     *
     * @return 用户信息
     * @author wangzhi
     * @createDate 2018/11/21
     */
    CloudTalkSDKAppDemoLoginVO getDeviceDataByEmail(@Param("phoneNo") String phoneNo, @Param("pswd") String pswd);

    /**
     * <desc>
     *      获取所有设备
     * </desc>
     *
     * @return 设备信息
     * @author wangzhi
     * @createDate 2018/11/21
     */
    List<CloudTalkSDKAPPAllDeviceListVO> getDeviceList(@Param("roomId") String roomId);
    
    
    
    /**
    *<desc>
    * 设置消息回调的url地址
    *</desc>
    *
    * @Author  chengshican
    * @Date   2020-11-19 19:27
    * @Param  
    * @Return      
    * @Exception   
    * 
    */

    Integer updateUserProjectByUserId(@Param("updateMessageCallbackRrl") String updateMessageCallbackRrl,@Param("projectId") String projectId,@Param("userId") String userId);

}
